﻿using Microsoft.Win32;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace FolderMeth
{
    public partial class FormSet : Form
    {
        public FormSet()
        {
            InitializeComponent();
        }

        private void BT_SetToReg_Click(object sender, EventArgs e)
        {
            string exePath = Application.ExecutablePath;
            RegistryKey x = Registry.ClassesRoot.OpenSubKey(@"Directory\shell",true);
            RegistryKey FM = x.CreateSubKey("FolderMeta");
            FM.SetValue("icon", exePath, RegistryValueKind.String);
            FM.SetValue("", "文件夹备注");
            RegistryKey FMC = FM.CreateSubKey("command");
            FMC.SetValue("", exePath + @" %v%");
        }

        private void BT_UnSetToReg_Click(object sender, EventArgs e)
        {

        }
    }
}
